home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / allfiles / angry / intro.dir / 00005_Script_animatez < prev    next >
Text File  |  1999-03-01  |  840b  |  40 lines

  1. property pSpr, step, direction
  2. property animCount, myAnim
  3. property pActive
  4.  
  5. on new me, thisSpr, thisAnim
  6.   set pSpr = thisSpr
  7.   set step = - 130
  8.   
  9.   set direction = 1
  10.   set myAnim = thisAnim
  11.   set animCount = 0
  12.   return me
  13. end
  14.  
  15.  
  16. on animLoop me   --ben's anim
  17.   
  18.   if animCount <> count(myAnim) then
  19.     set animCount = animCount + 1
  20.     
  21.     if animCount = 1 then
  22.       set the locH of sprite(pSpr) = the locH of sprite(pSpr) + step
  23.     else if animCount >= count(myAnim) then
  24.       set animCount = count(myAnim)      
  25.     end if
  26.     
  27.     set the member of sprite(pSpr) = member getAt(myAnim, animCount)
  28.     
  29.   else if animCount = count(myAnim) then
  30.     
  31.     set animCount = 0
  32.     
  33.   end if
  34.   
  35.   if the locH of sprite(pSpr) < -100 then
  36.     set the locH of sprite(pSpr) = 640
  37.   end if
  38.   
  39. end animLoop
  40.